﻿using System;
using System.Configuration;
using System.Windows.Forms;
using ff14bot;
using ff14bot.Enums;
using ff14bot.Helpers;

namespace Magitek.Settings
{
    public partial class ClassSettingsForm : Form
    {
        public ClassSettingsForm()
        {
            InitializeComponent();
        }

        private void ClassSettingsForm_Closed(object sender, EventArgs e)
        {
            MagitekSettings.Instance.Save();
        }

        public void ResetSettings()
        {
            
        }

        private void ClassSettingsForm_Load(object sender, EventArgs e)
        {

            #region WhiteMage
            if (Core.Player.CurrentJob == ClassJobType.WhiteMage)
            {
                tabControl1.SelectTab(tabWhiteMage);
            }
            txtWhiteMageCure.Text = Magitek.WindowSettings.WhiteMageCureHp.ToString();
            txtWhiteMageCureII.Text = Magitek.WindowSettings.WhiteMageCureIIHp.ToString();
            txtWhiteMageCureIII.Text = Magitek.WindowSettings.WhiteMageCureIIIHp.ToString();
            txtWhiteMageMedica.Text = Magitek.WindowSettings.WhiteMageMedicaHp.ToString();
            txtWhiteMageMedicaII.Text = Magitek.WindowSettings.WhiteMageMedicaIIHp.ToString();
            txtWhiteMageOvercure.Text = Magitek.WindowSettings.WhiteMageCureIIIOvercureHp.ToString();
            txtWhiteMagePullRange.Text = Magitek.WindowSettings.WhiteMagePullRange.ToString();
            txtWhiteMageRegen.Text = Magitek.WindowSettings.WhiteMageRegenHp.ToString();
            txtWhiteMageShroudOfSaintsMana.Text = Magitek.WindowSettings.WhiteMageShroudOfSaintsMp.ToString();
            txtWhiteMageStopDPSMana.Text = Magitek.WindowSettings.WhiteMageStopDPSMana.ToString();
            txtWhiteMageTankCure.Text = Magitek.WindowSettings.WhiteMageTankCureHp.ToString();
            txtWhiteMageTankCureII.Text = Magitek.WindowSettings.WhiteMageTankCureIIHp.ToString();
            txtWhiteMageTankRegen.Text = Magitek.WindowSettings.WhiteMageTankRegenHp.ToString();
            txtWhiteMageTargetsToCureIII.Text = Magitek.WindowSettings.WhiteMageTargetsToCureIII.ToString();

            chkWhiteMageDoDPS.Checked = Magitek.WindowSettings.WhiteMageDoDPS;
            chkWhiteMageProtectOOC.Checked = Magitek.WindowSettings.WhiteMageProtectOOC;
            chkWhiteMageStoneskinOOC.Checked = Magitek.WindowSettings.WhiteMageStoneskinOOC;
            chkWhiteMageSwiftCastRaise.Checked = Magitek.WindowSettings.WhiteMageSwiftcastRez;
            #endregion
            #region Scholar
            if (Core.Player.CurrentJob == ClassJobType.Scholar)
            {
                tabControl1.SelectTab(tabScholar);
            }

            if (Magitek.WindowSettings.ScholarUseEos)
            {
                cmbScholarPet.Text = "Eos";
            }

            if (Magitek.WindowSettings.ScholarUseSelene)
            {
                cmbScholarPet.Text = "Selene";
            }

            txtScholarAdloquium.Text = Magitek.WindowSettings.ScholarAdloquiumHp.ToString();
            txtScholarAetherflowMp.Text = Magitek.WindowSettings.ScholarAetherflowMp.ToString();
            txtScholarEnergyDrainMana.Text = Magitek.WindowSettings.ScholarEnergyDrainMana.ToString();
            txtScholarLustrate.Text = Magitek.WindowSettings.ScholarLustrateHp.ToString();
            txtScholarPetAdloquium.Text = Magitek.WindowSettings.ScholarPetAdloquiumHp.ToString();
            txtScholarPetPhysick.Text = Magitek.WindowSettings.ScholarPetPhysickHp.ToString();
            txtScholarPetSustain.Text = Magitek.WindowSettings.ScholarSustainHp.ToString();
            txtScholarPhysick.Text = Magitek.WindowSettings.ScholarPhysickHp.ToString();
            txtScholarPullRange.Text = Magitek.WindowSettings.ScholarPullRange.ToString();
            txtScholarSacredSoil.Text = Magitek.WindowSettings.ScholarSacredSoilHp.ToString();
            txtScholarStopDPSMana.Text = Magitek.WindowSettings.ScholarStopDPSMana.ToString();
            txtScholarSuccor.Text = Magitek.WindowSettings.ScholarSuccorHp.ToString();
            txtScholarTankAdloquium.Text = Magitek.WindowSettings.ScholarTankAdloquiumHp.ToString();
            txtScholarTankLustrate.Text = Magitek.WindowSettings.ScholarTankLustrateHp.ToString();
            txtScholarTankPhysick.Text = Magitek.WindowSettings.ScholarTankPhysickHp.ToString();
            txtScholarRouse.Text = Magitek.WindowSettings.ScholarRouseHp.ToString();

            chkScholarPetFollow.Checked = Magitek.WindowSettings.PetFollow;
            chkScholarLetMagitekControlPet.Checked = Magitek.WindowSettings.ScholarLetMagitekControlPet;
            chkScholarDoDPS.Checked = Magitek.WindowSettings.ScholarDoDPS;
            chkScholarEnergyDrain.Checked = Magitek.WindowSettings.ScholarUseEnergyDrain;
            chkScholarProtect.Checked = Magitek.WindowSettings.ScholarProtectOOC;
            chkScholarSingleTargetFlare.Checked = Magitek.WindowSettings.ScholarSingleTargetFlare;
            chkScholarStoneskin.Checked = Magitek.WindowSettings.ScholarStoneskinOOC;
            chkScholarSwiftcastRessurection.Checked = Magitek.WindowSettings.ScholarSwiftcastRez;
            chkScholarUseSacredSoil.Checked = Magitek.WindowSettings.ScholarUseSacredSoil;
            chkScholarVirus.Checked = Magitek.WindowSettings.ScholarUseVirus;
            chkScholarUseBane.Checked = Magitek.WindowSettings.ScholarUseBane;
            chkScholarMiasmaII.Checked = Magitek.WindowSettings.ScholarUseMiasmaII;
            chkScholarLustrate.Checked = Magitek.WindowSettings.ScholarUseLustrate;
            chkScholarSuccor.Checked = Magitek.WindowSettings.ScholarUseSuccor;
            #endregion
            #region Bard
            if (Core.Player.CurrentJob == ClassJobType.Bard)
            {
                tabControl1.SelectTab(tabBard);
            }

            lstBardDontVenomous.DataSource = Magitek.WindowSettings._bardDontVenomousList;

            txtBardArmysBalladTp.Text = Magitek.WindowSettings.BardStartArmysPaeonTp.ToString();
            txtBardDontVenomousBiteAboveHp.Text = Magitek.WindowSettings.BardUseVenomousAbove.ToString();
            txtBardDontWindbiteAboveHp.Text = Magitek.WindowSettings.BardUseWindbiteAbove.ToString();
            txtBardFeatherfootHp.Text = Magitek.WindowSettings.BardUseFeatherFootHp.ToString();
            txtBardInvigorateTp.Text = Magitek.WindowSettings.BardInvigorateTp.ToString();
            txtBardMagesBalladMp.Text = Magitek.WindowSettings.BardStartMagesBalladMp.ToString();
            txtBardPullRange.Text = Magitek.WindowSettings.BardPullRange.ToString();
            txtBardSecondWindHp.Text = Magitek.WindowSettings.BardUseSecondWindHp.ToString();
            txtBardStopAnythingButMagesMp.Text = Magitek.WindowSettings.BardStopAnythingButMagesBallad.ToString();
            txtBardTargetHPBelowToUseBuffs.Text = Magitek.WindowSettings.BardTargetHPBelowToUseBuffs.ToString();

            chkBardArmysPaeon.Checked = Magitek.WindowSettings.BardUseArmysPaeon;
            chkBardBarrage.Checked = Magitek.WindowSettings.BardUseBarrage;
            chkBardBloodForBlood.Checked = Magitek.WindowSettings.BardUseBloodForBlood;
            chkBardFlamingArrow.Checked = Magitek.WindowSettings.BardUseFlamingArrow;
            chkBardFoeRequiem.Checked = Magitek.WindowSettings.BardUseFoeRequieum;
            chkBardHawksEye.Checked = Magitek.WindowSettings.BardUseHawksEye;
            chkBardInternalRelease.Checked = Magitek.WindowSettings.BardUseInternalRelease;
            chkBardMagesBallad.Checked = Magitek.WindowSettings.BardUseMagesBallad;
            chkBardRagingStrikes.Checked = Magitek.WindowSettings.BardUseRagingStrikes;
			chkBardQuellingStrikes.Checked = Magitek.WindowSettings.BardUseQuellingStrikes;
            chkBardRepellingShot.Checked = Magitek.WindowSettings.BardUseRepellingShot;
            chkBardSwiftsongOOC.Checked = Magitek.WindowSettings.BardUseSwiftsong;
            chkBardUseAOE.Checked = Magitek.WindowSettings.BardUseAOE;
            #endregion
            #region Summoner
            if (Core.Player.CurrentJob == ClassJobType.Summoner)
            {
                tabControl1.SelectTab(tabSummoner);
            }

            if (Magitek.WindowSettings.SummonerUseIfrit)
            {
                cmbSummonerWhichPet.Text = "Ifrit";
            }

            if (Magitek.WindowSettings.SummonerUseGaruda)
            {
                cmbSummonerWhichPet.Text = "Garuda";
            }

            if (Magitek.WindowSettings.SummonerUseTitan)
            {
                cmbSummonerWhichPet.Text = "Titan";
            }

            txtSummonerEnergyDrainHp.Text = Magitek.WindowSettings.SummonerEnergyDrainHealth.ToString();
            txtSummonerEnergyDrainMp.Text = Magitek.WindowSettings.SummonerEnergyDrainMana.ToString();
            txtSummonerPetPhysickHp.Text = Magitek.WindowSettings.SummonerHealPetPhysick.ToString();
            txtSummonerPetSustainHp.Text = Magitek.WindowSettings.SummonerHealPetSustain.ToString();
            txtSummonerPullRange.Text = Magitek.WindowSettings.SummonerPullRange.ToString();
            txtSummonerUseDOTsAboveHp.Text = Magitek.WindowSettings.SummonerUSeDOTsHealth.ToString();
            txtSummonerUseDOTsHealthPercent.Text = Magitek.WindowSettings.SummonerUseDOTsHealthPercent.ToString();

            chkSummonerEyeForAnEye.Checked = Magitek.WindowSettings.SummonerUseEyeforanEye;
            chkSummonerFlare.Checked = Magitek.WindowSettings.SummonerUseFlare;
            chkSummonerFlareSingleTarget.Checked = Magitek.WindowSettings.SummonerSingleTargetFlare;
            chkSummonerMiasmaII.Checked = Magitek.WindowSettings.SummonerUseMiasmaII;
            chkSummonerQuellingStrikes.Checked = Magitek.WindowSettings.SummonerUseQuellingStrikes;
            chkSummonerSwiftcastResurrection.Checked = Magitek.WindowSettings.SummonerSwiftcastRez;
            chkSummonerUseAOE.Checked = Magitek.WindowSettings.SummonerUseAOE;
            chkSummonerUseBuffs.Checked = Magitek.WindowSettings.SummonerUseBuffs;
            chkSummonerVirus.Checked = Magitek.WindowSettings.SummonerUseVirus;
            chkSummonerSwiftcastFlare.Checked = Magitek.WindowSettings.SummonerSwiftcastFlare;
            chkSummonerUsePotentPoisoningPotion.Checked = Magitek.WindowSettings.SummonerUsePotentPoisoningPotion;
            chkContagionWaitForPotion.Checked = Magitek.WindowSettings.SummonerContagionWithPotion;
            chkSummonerLetMagitekControlPet.Checked = Magitek.WindowSettings.SummonerLetMagitekControlPet;
            chkSummonerSaveBuffs.Checked = Magitek.WindowSettings.SummonerSaveBuffs;
            chkSummonerAerialOnSingle.Checked = Magitek.WindowSettings.SummonerGarudaUseAerialOnSingle;
            chkSummonerPetFollow.Checked = Magitek.WindowSettings.PetFollow;
            #endregion
            #region Dragoon
            if (Core.Player.CurrentJob == ClassJobType.Dragoon)
            {
                tabControl1.SelectTab(tabDragoon);
            }
            txtDragoonBloodbath.Text = Magitek.WindowSettings.DragoonUseBloodbathHp.ToString();
            txtDragoonPullRange.Text = Magitek.WindowSettings.DragoonPullRange.ToString();
            txtDragoonSecondWind.Text = Magitek.WindowSettings.DragoonUseSecondWindHp.ToString();
            txtDragoonTpInvigorate.Text = Magitek.WindowSettings.DragoonUseInvigorateTp.ToString();

            chkDragoonJump.Checked = Magitek.WindowSettings.DragoonUseJump;
            chkDragoonPiercingTalon.Checked = Magitek.WindowSettings.DragoonUsePiercingTalon;
            chkDragoonSpineshatterDive.Checked = Magitek.WindowSettings.DragoonUseSpineshatterDive;
            chkDragoonUseBuffs.Checked = Magitek.WindowSettings.DragoonUseBuffs;
            chkDragoonDragonfireDive.Checked = Magitek.WindowSettings.DragoonUseDragonfireDive;
            chkDragoonUseAOE.Checked = Magitek.WindowSettings.DragoonUseAOE;
            chkDragoonSaveBuffs.Checked = Magitek.WindowSettings.DragoonSaveBuffs;
            #endregion
            #region BlackMage
            if (Core.Player.CurrentJob == ClassJobType.BlackMage)
            {
                tabControl1.SelectTab(tabBlackMage);
            }
            txtBlackMageManaWall.Text = Magitek.WindowSettings.BlackMageUseManaWallHp.ToString();
            txtBlackMageManaWard.Text = Magitek.WindowSettings.BlackMageUseManawardHp.ToString();
            txtBlackMageMpToBlizzardIII.Text = Magitek.WindowSettings.BlackMageBlizzardIIIMana.ToString();
            txtBlackMagePhysick.Text = Magitek.WindowSettings.BlackMagePhysickHp.ToString();
            txtBlackMagePullRange.Text = Magitek.WindowSettings.BlackMagePullRange.ToString();
            txtBlackMageThunderAboveHp.Text = Magitek.WindowSettings.BlackMageUseThunderAboveHp.ToString();

            chkBlackMageBlizzardII.Checked = Magitek.WindowSettings.BlackMageUseBlizzard2;
            chkBlackMageFlareSingleTarget.Checked = Magitek.WindowSettings.BlackMageUseSingleFlare;
            chkBlackMagePhysick.Checked = Magitek.WindowSettings.BlackMageUsePhysick;
            chkBlackMageRagingStrikes.Checked = Magitek.WindowSettings.BlackMageUseRagingStrikes;
            chkBlackMageQuellingStrikes.Checked = Magitek.WindowSettings.BlackMageUseQuellingStrikes;
            chkBlackMageUseVirus.Checked = Magitek.WindowSettings.BlackMageUseVirus;
            chkBlackMageSurecast.Checked = Magitek.WindowSettings.BlackMageUseSurecast;
            chkBlackMageUseAOE.Checked = Magitek.WindowSettings.BlackMageUseAOE;
            chkBlackMageSpreadThunder.Checked = Magitek.WindowSettings.BlackMageSpreadThunder;
            #endregion
            #region Monk
            if (Core.Player.CurrentJob == ClassJobType.Monk)
            {
                tabControl1.SelectTab(tabMonk);
            }

            lstMonkArmOfTheDestroyerInterrupt.DataSource = Magitek.WindowSettings._monkarmyofthedestroyerinterruptList;
            lstMonkSteelPeakInterrupt.DataSource = Magitek.WindowSettings._monksteelpeakinterruptList;

            txtMonkFeatherfoot.Text = Magitek.WindowSettings.MonkUseFeatherfootHp.ToString();
            txtMonkFistsOfEarth.Text = Magitek.WindowSettings.MonkUseFistsOfEarthHp.ToString();
            txtMonkInvigorate.Text = Magitek.WindowSettings.MonkUseInvigorateTp.ToString();
            txtMonkMantra.Text = Magitek.WindowSettings.MonkUseMantraHp.ToString();
            txtMonkPullRange.Text = Magitek.WindowSettings.MonkPullRange.ToString();
            txtMonkSecondWind.Text = Magitek.WindowSettings.MonkUseSecondWindHp.ToString();

            chkMonkFistsOfWind.Checked = Magitek.WindowSettings.MonkUseFistsOfWind;
            chkMonkFracture.Checked = Magitek.WindowSettings.MonkUseFracture;
            chkMonkHowlingFistSingle.Checked = Magitek.WindowSettings.MonkUseHowlingFistSingle;
            chkMonkUseAOE.Checked = Magitek.WindowSettings.MonkUseAOE;
            chkMonkSteelPeakInterrupt.Checked = Magitek.WindowSettings.MonkUseSteelPeakInterrupt;
            chkMonkUseBuffs.Checked = Magitek.WindowSettings.MonkUseBuffs;
            chkMonkUseShoulderTackle.Checked = Magitek.WindowSettings.MonkUseShoulderTackle;
            #endregion
            #region Paladin
            if (Core.Player.CurrentJob == ClassJobType.Paladin)
            {
                tabControl1.SelectTab(tabPaladin);
            }
            txtPaladinAwarenessHp.Text = Magitek.WindowSettings.PaladinUseAwarenessHpPercent.ToString();
            txtPaladinBulwarkHp.Text = Magitek.WindowSettings.PaladinUseBulwarkHpPercent.ToString();
            txtPaladinConvalescenceHp.Text = Magitek.WindowSettings.PaladinUseConvalescenceHpPercent.ToString();
            txtPaladinCoverHp.Text = Magitek.WindowSettings.PaladinUseCoverHp.ToString();
            txtPaladinFlashMpStop.Text = Magitek.WindowSettings.PaladinStopFlashMpPercent.ToString();
            txtPaladinForesightHp.Text = Magitek.WindowSettings.PaladinUseForesightHpPercent.ToString();
            txtPaladinHallowedGroundHp.Text = Magitek.WindowSettings.PaladinUseHallowedGroundHpPercent.ToString();
            txtPaladinRampartHp.Text = Magitek.WindowSettings.PaladinUseRampartHpPercent.ToString();
            txtPaladinRiotBladeMp.Text = Magitek.WindowSettings.PaladinUseRiotBladeMpPercent.ToString();
            txtPaladinSentinelHp.Text = Magitek.WindowSettings.PaladinUseSentinelHpPercent.ToString();
            txtPaladinPullRange.Text = Magitek.WindowSettings.PaladinPullRange.ToString();
            txtPaladinUseCureHp.Text = Magitek.WindowSettings.PaladinUseCureHp.ToString();


            chkPaladinBashToInterrupt.Checked = Magitek.WindowSettings.PaladinUseBashToInterrupt;
            chkPaladinCover.Checked = Magitek.WindowSettings.PaladinUseCover;
            chkPaladinFracture.Checked = Magitek.WindowSettings.PaladinUseFracture;
            chkPaladinProvoke.Checked = Magitek.WindowSettings.PaladinUseProvoke;
            chkPaladinRiotBlade.Checked = Magitek.WindowSettings.PaladinUseRiotBlade;
            chkPaladinShieldLob.Checked = Magitek.WindowSettings.PaladinUseShieldLob;
            chkPaladinShieldOath.Checked = Magitek.WindowSettings.PaladinUseShieldOath;
            chkPaladinSpiritsToInterruptOnly.Checked = Magitek.WindowSettings.PaladinUseSpiritsWithinOnlyToInterrupt;
            chkPaladinTemperedWill.Checked = Magitek.WindowSettings.PaladinUseTemperedWill;
            chkPaladinUseSpiritsWithin.Checked = Magitek.WindowSettings.PaladinUseSpiritsWithin;
            chkPaladinFlash.Checked = Magitek.WindowSettings.PaladinUseFlash;
            chkPaladinCircleSingle.Checked = Magitek.WindowSettings.PaladinCircleSingle;
            chkPaladinUseShieldSwipe.Checked = Magitek.WindowSettings.PaladinUseShieldSwipe;
            chkPaladinUseCure.Checked = Magitek.WindowSettings.PaladinUseCure;

            #endregion
            #region Warrior
            if (Core.Player.CurrentJob == ClassJobType.Warrior)
            {
                tabControl1.SelectTab(tabWarrior);
            }
            txtWarriorAwareness.Text = Magitek.WindowSettings.WarriorUseAwarenessHp.ToString();
            txtWarriorBloodbath.Text = Magitek.WindowSettings.WarriorUseBloodbath.ToString();
            txtWarriorConvalescence.Text = Magitek.WindowSettings.WarriorUseConvalescenceHp.ToString();
            txtWarriorFeatherfoot.Text = Magitek.WindowSettings.WarriorUseFeatherfootHp.ToString();
            txtWarriorForesight.Text = Magitek.WindowSettings.WarriorUseForesightHp.ToString();
            txtWarriorHolmgang.Text = Magitek.WindowSettings.WarriorUseHolmGangHp.ToString();
            txtWarriorSecondWind.Text = Magitek.WindowSettings.WarriorUseSecondWindHp.ToString();
            txtWarriorThrillOfBattle.Text = Magitek.WindowSettings.WarriorUseThrillOfBattleHp.ToString();
            txtWarriorVengeance.Text = Magitek.WindowSettings.WarriorUseVengeanceHp.ToString();
            txtWarriorPullRange.Text = Magitek.WindowSettings.WarriorPullRange.ToString();
            txtWarriorFlashStopMp.Text = Magitek.WindowSettings.WarriorFlashStopMp.ToString();
            txtWarriorOverpowerStopTp.Text = Magitek.WindowSettings.WarriorOverpowerStopTp.ToString();

            chkWarriorDefiance.Checked = Magitek.WindowSettings.WarriorUseDefiance;
            chkWarriorUseBerserk.Checked = Magitek.WindowSettings.WarriorUseBerserk;
            chkWarriorFlash.Checked = Magitek.WindowSettings.WarriorUseFlash;
            chkWarriorFracture.Checked = Magitek.WindowSettings.WarriorUseFracture;
            chkWarriorInfuriate.Checked = Magitek.WindowSettings.WarriorUseInfuriate;
            chkWarriorInnerBeast.Checked = Magitek.WindowSettings.WarriorUseInnerBeast;
            chkWarriorPrioritizeBuffs.Checked = Magitek.WindowSettings.WarriorStormPriority;
            chkWarriorProvoke.Checked = Magitek.WindowSettings.WarriorUseProvoke;
            chkWarriorStormsEye.Checked = Magitek.WindowSettings.WarriorUseStormsEye;
            chkWarriorStormsPath.Checked = Magitek.WindowSettings.WarriorUseStormsPath;
            chkWarriorTomahawk.Checked = Magitek.WindowSettings.WarriorUseTomahawk;
            chkWarriorUseOverpower.Checked = Magitek.WindowSettings.WarriorUseOverpower;
            chkWarriorToggleMode.Checked = Magitek.WindowSettings.WarriorToggleMode;
            chkWarriorSaveBrutalSwing.Checked = Magitek.WindowSettings.WarriorSaveBrutalSwing;
            #endregion
            #region All Basic Jobs
            
            if (Core.Player.CurrentJob == ClassJobType.Arcanist ||
                Core.Player.CurrentJob == ClassJobType.Thaumaturge ||
                Core.Player.CurrentJob == ClassJobType.Lancer ||
                Core.Player.CurrentJob == ClassJobType.Gladiator ||
                Core.Player.CurrentJob == ClassJobType.Conjurer ||
                Core.Player.CurrentJob == ClassJobType.Archer ||
                Core.Player.CurrentJob == ClassJobType.Marauder ||
                Core.Player.CurrentJob == ClassJobType.Pugilist)
            {
                tabControl1.SelectTab(tabAllBasic);
            }

            if (Magitek.WindowSettings.AllBasicClassesUseAttacker)
            {
                cmbAllBasicClassesPet.Text = "Attacker";
            }

            if (Magitek.WindowSettings.AllBasicClassesUseTank)
            {
                cmbAllBasicClassesPet.Text = "Tank";
            }

            chkAllBasicClassesHealParty.Checked = Magitek.WindowSettings.AllBasicClassesHealParty;
            AllBasicPullRange.Text = Magitek.WindowSettings.AllBasicClassespullrange.ToString();

            #endregion
            #region PVP Abilities
            lstCCBreaks.DataSource = Magitek.WindowSettings._pvpCCbreakList;

            txtPVPEnemiesToAOE.Text = Magitek.WindowSettings.pvpEnemiesToAOE.ToString();
            txtPVPManaDrawMpPercent.Text = Magitek.WindowSettings.pvpManaDrawMpPercent.ToString();
            txtPVPTetsudoHpPercent.Text = Magitek.WindowSettings.pvpTetsudoHpPercent.ToString();
            txtAttunementHpPercent.Text = Magitek.WindowSettings.pvpAttunementHpPercent.ToString();

            chkUsePvpAbilities.Checked = Magitek.WindowSettings.DoPVP;
            chkPVPPurify.Checked = Magitek.WindowSettings.pvpPurify;
            chkPVPFetterWard.Checked = Magitek.WindowSettings.pvpFetterWard;
            chkPVPAttunement.Checked = Magitek.WindowSettings.pvpAttunement;
            chkPVPManaDraw.Checked = Magitek.WindowSettings.pvpManaDraw;
            chkPVPEquanimity.Checked = Magitek.WindowSettings.pvpEquanimity;
            chkPVPFocalization.Checked = Magitek.WindowSettings.pvpFocalization;
            chkPVPDivineBreath.Checked = Magitek.WindowSettings.pvpDivineBreath;
            chkPVPSacredPrism.Checked = Magitek.WindowSettings.pvpSacredPrism;
            chkPVPTetsudo.Checked = Magitek.WindowSettings.pvpTetsudo;
            chkPVPNightWing.Checked = Magitek.WindowSettings.pvpNightWing;
            chkPVPPhantomDart.Checked = Magitek.WindowSettings.pvpPhantomDart;
            chkPVPThrillOfWar.Checked = Magitek.WindowSettings.pvpThrillOfWar;
            chkPVPWeaponThrow.Checked = Magitek.WindowSettings.pvpWeaponThrow;
            chkPVPAethericBurst.Checked = Magitek.WindowSettings.pvpAethericBurst;
            chkPVPAuraBlast.Checked = Magitek.WindowSettings.pvpAuraBlast;
            chkPVPImpulseRush.Checked = Magitek.WindowSettings.pvpImpulseRush;
            chkPVPMythrilTempest.Checked = Magitek.WindowSettings.pvpMythrilTempest;
            chkPVPMistyVeil.Checked = Magitek.WindowSettings.pvpMistyVeil;
            chkPVPFarshot.Checked = Magitek.WindowSettings.pvpFarshot;
            chkPVPBlastShot.Checked = Magitek.WindowSettings.pvpBlastShot;
            chkPVPManasong.Checked = Magitek.WindowSettings.pvpManaSong;
            chkPVPAxeKick.Checked = Magitek.WindowSettings.pvpAxeKick;
            chkPVPGlorySlash.Checked = Magitek.WindowSettings.pvpGlorySlash;
            chkPVPFullSwing.Checked = Magitek.WindowSettings.pvpFullSwing;
            chkPVPSomerSault.Checked = Magitek.WindowSettings.pvpSomersault;
            chkPVPSkewer.Checked = Magitek.WindowSettings.pvpSkewer;
            chkPVPEnliven.Checked = Magitek.WindowSettings.pvpEnliven;
            chkPVPWither.Checked = Magitek.WindowSettings.pvpWither;


            #endregion

        }

        #region WhiteMage
        private void txtWhiteMageCure_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageCure.Text))
            {
                Magitek.WindowSettings.WhiteMageCureHp = int.Parse(txtWhiteMageCure.Text);
            }
        }

        private void txtWhiteMageCureII_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageCureII.Text))
            {
                Magitek.WindowSettings.WhiteMageCureIIHp = int.Parse(txtWhiteMageCureII.Text);
            }
        }

        private void txtWhiteMageCureIII_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageCureIII.Text))
            {
                Magitek.WindowSettings.WhiteMageCureIIIHp = int.Parse(txtWhiteMageCureIII.Text);
            }
        }

        private void txtWhiteMageMedica_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageMedica.Text))
            {
                Magitek.WindowSettings.WhiteMageMedicaHp = int.Parse(txtWhiteMageMedica.Text);
            }
        }

        private void txtWhiteMageMedicaII_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageMedicaII.Text))
            {
                Magitek.WindowSettings.WhiteMageMedicaIIHp = int.Parse(txtWhiteMageMedicaII.Text);
            }
        }

        private void txtWhiteMageOvercure_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageOvercure.Text))
            {
                Magitek.WindowSettings.WhiteMageCureIIIOvercureHp = int.Parse(txtWhiteMageOvercure.Text);
            }
        }

        private void txtWhiteMageRegen_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageRegen.Text))
            {
                Magitek.WindowSettings.WhiteMageRegenHp = int.Parse(txtWhiteMageRegen.Text);
            }
        }

        private void txtWhiteMageTargetsToCureIII_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageTargetsToCureIII.Text))
            {
                Magitek.WindowSettings.WhiteMageTargetsToCureIII = int.Parse(txtWhiteMageTargetsToCureIII.Text);
            }
        }

        private void txtWhiteMageTankCure_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageTankCure.Text))
            {
                Magitek.WindowSettings.WhiteMageTankCureHp = int.Parse(txtWhiteMageTankCure.Text);
            }
        }

        private void txtWhiteMageTankCureII_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageTankCureII.Text))
            {
                Magitek.WindowSettings.WhiteMageTankCureIIHp = int.Parse(txtWhiteMageTankCureII.Text);
            }
        }

        private void txtWhiteMageTankRegen_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageTankRegen.Text))
            {
                Magitek.WindowSettings.WhiteMageTankRegenHp = int.Parse(txtWhiteMageTankRegen.Text);
            }
        }

        private void txtWhiteMagePullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMagePullRange.Text))
            {
                Magitek.WindowSettings.WhiteMagePullRange = int.Parse(txtWhiteMagePullRange.Text);
            }
        }

        private void chkWhiteMageSwiftCastRaise_CheckedChanged(object sender, EventArgs e)
        {

            Magitek.WindowSettings.WhiteMageSwiftcastRez = chkWhiteMageSwiftCastRaise.Checked;
        }

        private void chkWhiteMageProtectOOC_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WhiteMageProtectOOC = chkWhiteMageProtectOOC.Checked;
        }

        private void chkWhiteMageStoneskinOOC_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WhiteMageStoneskinOOC = chkWhiteMageStoneskinOOC.Checked;
        }

        private void chkWhiteMageDoDPS_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WhiteMageDoDPS = chkWhiteMageDoDPS.Checked;
        }

        private void txtWhiteMageStopDPSMana_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageStopDPSMana.Text))
            {
                Magitek.WindowSettings.WhiteMageStopDPSMana = int.Parse(txtWhiteMageStopDPSMana.Text);
            }
        }

        private void txtWhiteMageShroudOfSaintsMana_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWhiteMageShroudOfSaintsMana.Text))
            {
                Magitek.WindowSettings.WhiteMageShroudOfSaintsMp = int.Parse(txtWhiteMageShroudOfSaintsMana.Text);
            }
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            MagitekSettings.Instance.Save();
            this.Close();
        }
        #endregion
        #region Scholar
        private void txtScholarAdloquium_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarAdloquium.Text))
            {
                Magitek.WindowSettings.ScholarAdloquiumHp = int.Parse(txtScholarAdloquium.Text);
            }
        }
        private void chkScholarPetFollow_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PetFollow = chkScholarPetFollow.Checked;
        }
        private void chkScholarSuccor_CheckedChanged(object sender, EventArgs e)
        {

            Magitek.WindowSettings.ScholarUseSuccor = chkScholarSuccor.Checked;
        }

        private void chkScholarLustrate_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarUseLustrate = chkScholarLustrate.Checked;
        }

        private void chkScholarLetMagitekControlPet_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarLetMagitekControlPet = chkScholarLetMagitekControlPet.Checked;
        }
        private void chkScholarUseBane_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarUseBane = chkScholarUseBane.Checked;
        }
        private void chkScholarMiasmaII_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarUseMiasmaII = chkScholarMiasmaII.Checked;
        }

        private void txtScholarRouse_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarRouse.Text))
            {
                Magitek.WindowSettings.ScholarRouseHp = int.Parse(txtScholarRouse.Text);
            }
        }

        private void txtScholarPhysick_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarPhysick.Text))
            {
                Magitek.WindowSettings.ScholarPhysickHp = int.Parse(txtScholarPhysick.Text);
            }
        }

        private void txtScholarLustrate_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarLustrate.Text))
            {
                Magitek.WindowSettings.ScholarLustrateHp = int.Parse(txtScholarLustrate.Text);
            }
        }

        private void txtScholarSuccor_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarSuccor.Text))
            {
                Magitek.WindowSettings.ScholarSuccorHp = int.Parse(txtScholarSuccor.Text);
            }
        }

        private void txtScholarSacredSoil_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarSacredSoil.Text))
            {
                Magitek.WindowSettings.ScholarSacredSoilHp = int.Parse(txtScholarSacredSoil.Text);
            }
        }

        private void txtScholarTankAdloquium_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarTankAdloquium.Text))
            {
                Magitek.WindowSettings.ScholarTankAdloquiumHp = int.Parse(txtScholarTankAdloquium.Text);
            }
        }

        private void txtScholarTankPhysick_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarTankPhysick.Text))
            {
                Magitek.WindowSettings.ScholarTankPhysickHp = int.Parse(txtScholarTankPhysick.Text);
            }
        }

        private void txtScholarTankLustrate_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarTankLustrate.Text))
            {
                Magitek.WindowSettings.ScholarTankLustrateHp = int.Parse(txtScholarTankLustrate.Text);
            }
        }

        private void txtScholarPetAdloquium_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarPetAdloquium.Text))
            {
                Magitek.WindowSettings.ScholarPetAdloquiumHp = int.Parse(txtScholarPetAdloquium.Text);
            }
        }

        private void txtScholarPetPhysick_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarPetPhysick.Text))
            {
                Magitek.WindowSettings.ScholarPetPhysickHp = int.Parse(txtScholarPetPhysick.Text);
            }
        }

        private void txtScholarPetSustain_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarPetSustain.Text))
            {
                Magitek.WindowSettings.ScholarSustainHp = int.Parse(txtScholarPetSustain.Text);
            }
        }

        private void txtScholarPullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarPullRange.Text))
            {
                Magitek.WindowSettings.ScholarPullRange = int.Parse(txtScholarPullRange.Text);
            }
        }

        private void txtScholarStopDPSMana_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarStopDPSMana.Text))
            {
                Magitek.WindowSettings.ScholarStopDPSMana = int.Parse(txtScholarStopDPSMana.Text);
            }
        }

        private void txtScholarAetherflowMp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarAetherflowMp.Text))
            {
                Magitek.WindowSettings.ScholarAetherflowMp = int.Parse(txtScholarAetherflowMp.Text);
            }
        }

        private void txtScholarEnergyDrainMana_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtScholarEnergyDrainMana.Text))
            {
                Magitek.WindowSettings.ScholarEnergyDrainMana = int.Parse(txtScholarEnergyDrainMana.Text);
            }
        }

        private void chkScholarUseSacredSoil_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarUseSacredSoil = chkScholarUseSacredSoil.Checked;
        }

        private void chkScholarSwiftcastRessurection_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarSwiftcastRez = chkScholarSwiftcastRessurection.Checked;
        }

        private void chkScholarProtect_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarProtectOOC = chkScholarProtect.Checked;
        }

        private void chkScholarStoneskin_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarStoneskinOOC = chkScholarStoneskin.Checked;
        }

        private void chkScholarDoDPS_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarDoDPS = chkScholarDoDPS.Checked;
        }

        private void chkScholarEnergyDrain_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarUseEnergyDrain = chkScholarEnergyDrain.Checked;
        }

        private void chkScholarVirus_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarUseVirus = chkScholarVirus.Checked;
        }

        private void chkScholarSingleTargetFlare_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.ScholarSingleTargetFlare = chkScholarSingleTargetFlare.Checked;
        }

        private void cmbScholarPet_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbScholarPet.Text == "Eos")
            {
                Magitek.WindowSettings.ScholarUseEos = true;
                Magitek.WindowSettings.ScholarUseSelene = false;
            }

            if (cmbScholarPet.Text == "Selene")
            {
                Magitek.WindowSettings.ScholarUseSelene = true;
                Magitek.WindowSettings.ScholarUseEos = false;
            }

        }
        #endregion
        #region Bard
        private void txtBardPullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBardPullRange.Text))
            {
                Magitek.WindowSettings.BardPullRange = int.Parse(txtBardPullRange.Text);
            }
        }
        private void txtBardTargetHPBelowToUseBuffs_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBardTargetHPBelowToUseBuffs.Text))
            {
                Magitek.WindowSettings.BardTargetHPBelowToUseBuffs = int.Parse(txtBardTargetHPBelowToUseBuffs.Text);
            }
        }

        private void chkBardUseAOE_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseAOE = chkBardUseAOE.Checked;
        }
        private void txtBardInvigorateTp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBardInvigorateTp.Text))
            {
                Magitek.WindowSettings.BardInvigorateTp = int.Parse(txtBardInvigorateTp.Text);
            }
        }

        private void txtBardFeatherfootHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBardFeatherfootHp.Text))
            {
                Magitek.WindowSettings.BardUseFeatherFootHp = int.Parse(txtBardFeatherfootHp.Text);
            }
        }

        private void txtBardSecondWindHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBardSecondWindHp.Text))
            {
                Magitek.WindowSettings.BardUseSecondWindHp = int.Parse(txtBardSecondWindHp.Text);
            }
        }

        private void txtBardMagesBalladMp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBardMagesBalladMp.Text))
            {
                Magitek.WindowSettings.BardStartMagesBalladMp = int.Parse(txtBardMagesBalladMp.Text);
            }
        }

        private void txtBardArmysBalladTp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(chkBardArmysPaeon.Text))
            {
                Magitek.WindowSettings.BardStartArmysPaeonTp = int.Parse(txtBardArmysBalladTp.Text);
            }
        }

        private void txtBardStopAnythingButMagesMp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBardStopAnythingButMagesMp.Text))
            {
                Magitek.WindowSettings.BardStopAnythingButMagesBallad = int.Parse(txtBardStopAnythingButMagesMp.Text);
            }
        }

        private void txtBardDontVenomousBiteAboveHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBardDontVenomousBiteAboveHp.Text))
            {
                Magitek.WindowSettings.BardUseVenomousAbove = int.Parse(txtBardDontVenomousBiteAboveHp.Text);
            }
        }

        private void lstBardDontVenomousAdd_Click(object sender, EventArgs e)
        {
            Magitek.WindowSettings._bardDontVenomousList.Add(txtBardDontVenomous.Text);
            txtBardDontVenomous.Clear();
        }
        private void lstBardDontVenomousRemove_Click(object sender, EventArgs e)
        {
            if (lstBardDontVenomous.SelectedItems.Count > 0)
            {
                Magitek.WindowSettings._bardDontVenomousList.Remove((string) lstBardDontVenomous.SelectedValue);
            }
        }

        private void txtBardDontWindbiteAboveHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBardDontWindbiteAboveHp.Text))
            {
                Magitek.WindowSettings.BardUseWindbiteAbove = int.Parse(txtBardDontWindbiteAboveHp.Text);
            }
        }

        private void chkBardFlamingArrow_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseFlamingArrow = chkBardFlamingArrow.Checked;
        }

        private void chkBardRepellingShot_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseRepellingShot = chkBardRepellingShot.Checked;
        }

        private void chkBardSwiftsongOOC_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseSwiftsong = chkBardSwiftsongOOC.Checked;
        }

        private void chkBardMagesBallad_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseMagesBallad = chkBardMagesBallad.Checked;
        }

        private void chkBardArmysPaeon_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseArmysPaeon = chkBardArmysPaeon.Checked;
        }

        private void chkBardFoeRequiem_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseFoeRequieum = chkBardFoeRequiem.Checked;
        }

        private void chkBardBarrage_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseBarrage = chkBardBarrage.Checked;
        }

        private void chkBardBloodForBlood_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseBloodForBlood = chkBardBloodForBlood.Checked;
        }

        private void chkBardHawksEye_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseHawksEye = chkBardHawksEye.Checked;
        }

        private void chkBardInternalRelease_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseInternalRelease = chkBardInternalRelease.Checked;
        }

        private void chkBardRagingStrikes_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseRagingStrikes = chkBardRagingStrikes.Checked;
        }
		
		private void chkBardQuellingStrikes_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BardUseQuellingStrikes = chkBardQuellingStrikes.Checked;
        }
        #endregion
        #region Summoner

        private void chkSummonerAerialOnSingle_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerGarudaUseAerialOnSingle = chkSummonerAerialOnSingle.Checked;
        }

        private void chkSummonerPetFollow_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PetFollow = chkSummonerPetFollow.Checked;
        }
        private void txtSummonerPullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtSummonerPullRange.Text))
            {
                Magitek.WindowSettings.SummonerPullRange = int.Parse(txtSummonerPullRange.Text);
            }   
        }
        private void chkSummonerUsePotentPoisoningPotion_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerUsePotentPoisoningPotion = chkSummonerUsePotentPoisoningPotion.Checked;
        }

        private void chkContagionWaitForPotion_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerContagionWithPotion = chkContagionWaitForPotion.Checked;
        }
        private void chkSummonerLetMagitekControlPet_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerLetMagitekControlPet = chkSummonerLetMagitekControlPet.Checked;
        }

        private void chkSummonerSaveBuffs_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerSaveBuffs = chkSummonerSaveBuffs.Checked;
        }

        private void txtSummonerUseDOTsHealthPercent_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtSummonerUseDOTsHealthPercent.Text))
            {
                Magitek.WindowSettings.SummonerUseDOTsHealthPercent = int.Parse(txtSummonerUseDOTsHealthPercent.Text);
            }
        }
    
        private void chkSummonerSwiftcastFlare_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerSwiftcastFlare = chkSummonerSwiftcastFlare.Checked;
        }
        private void txtSummonerEnergyDrainHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtSummonerEnergyDrainHp.Text))
            {
                Magitek.WindowSettings.SummonerEnergyDrainHealth = int.Parse(txtSummonerEnergyDrainHp.Text);
            }
        }

        private void txtSummonerEnergyDrainMp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtSummonerEnergyDrainMp.Text))
            {
                Magitek.WindowSettings.SummonerEnergyDrainMana = int.Parse(txtSummonerEnergyDrainMp.Text);
            }
        }

        private void txtSummonerPetPhysickHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtSummonerPetPhysickHp.Text))
            {
                Magitek.WindowSettings.SummonerHealPetPhysick = int.Parse(txtSummonerPetPhysickHp.Text);
            }
        }

        private void txtSummonerPetSustainHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtSummonerPetSustainHp.Text))
            {
                Magitek.WindowSettings.SummonerHealPetSustain = int.Parse(txtSummonerPetSustainHp.Text);
            }
        }

        private void txtSummonerUseDOTsAboveHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtSummonerUseDOTsAboveHp.Text))
            {
                Magitek.WindowSettings.SummonerUSeDOTsHealth = int.Parse(txtSummonerUseDOTsAboveHp.Text);
            }
        }

        private void cmbSummonerWhichPet_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbSummonerWhichPet.Text == "Ifrit")
            {
                Magitek.WindowSettings.SummonerUseIfrit = true;
                Magitek.WindowSettings.SummonerUseGaruda = false;
                Magitek.WindowSettings.SummonerUseTitan = false;
            }

            if (cmbSummonerWhichPet.Text == "Titan")
            {
                Magitek.WindowSettings.SummonerUseIfrit = false;
                Magitek.WindowSettings.SummonerUseGaruda = false;
                Magitek.WindowSettings.SummonerUseTitan = true;
            }

            if (cmbSummonerWhichPet.Text == "Garuda")
            {
                Magitek.WindowSettings.SummonerUseIfrit = false;
                Magitek.WindowSettings.SummonerUseGaruda = true;
                Magitek.WindowSettings.SummonerUseTitan = false;
            }

        }

        private void chkSummonerFlare_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerUseFlare = chkSummonerFlare.Checked;
        }

        private void chkSummonerFlareSingleTarget_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerSingleTargetFlare = chkSummonerFlareSingleTarget.Checked;
        }

        private void chkSummonerVirus_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerUseVirus = chkSummonerVirus.Checked;
        }

        private void chkSummonerSwiftcastResurrection_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerSwiftcastRez = chkSummonerSwiftcastResurrection.Checked;
        }

        private void chkSummonerMiasmaII_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerUseMiasmaII = chkSummonerMiasmaII.Checked;
        }

        private void chkSummonerUseAOE_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerUseAOE = chkSummonerUseAOE.Checked;
        }

        private void chkSummonerUseBuffs_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerUseBuffs = chkSummonerUseBuffs.Checked;
        }

        private void chkSummonerEyeForAnEye_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerUseEyeforanEye = chkSummonerEyeForAnEye.Checked;
        }

        private void chkSummonerQuellingStrikes_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.SummonerUseQuellingStrikes = chkSummonerQuellingStrikes.Checked;
        }
        #endregion
        #region Dragoon
        private void txtDragoonPullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtDragoonPullRange.Text))
            {
                Magitek.WindowSettings.DragoonPullRange = int.Parse(txtDragoonPullRange.Text);
            }
        }
        private void chkDragoonSaveBuffs_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.DragoonSaveBuffs = chkDragoonSaveBuffs.Checked;
        }

        private void chkDragoonUseAOE_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.DragoonUseAOE = chkDragoonUseAOE.Checked;
        }
        private void txtDragoonTpInvigorate_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtDragoonTpInvigorate.Text))
            {
                Magitek.WindowSettings.DragoonUseInvigorateTp = int.Parse(txtDragoonTpInvigorate.Text);
            }
        }

        private void txtDragoonBloodbath_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtDragoonBloodbath.Text))
            {
                Magitek.WindowSettings.DragoonUseBloodbathHp = int.Parse(txtDragoonBloodbath.Text);
            }
        }

        private void txtDragoonSecondWind_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtDragoonSecondWind.Text))
            {
                Magitek.WindowSettings.DragoonUseSecondWindHp = int.Parse(txtDragoonSecondWind.Text);
            }
        }

        private void chkDragoonJump_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.DragoonUseJump = chkDragoonJump.Checked;
        }

        private void chkDragoonPiercingTalon_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.DragoonUsePiercingTalon = chkDragoonPiercingTalon.Checked;
        }

        private void chkDragoonSpineshatterDive_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.DragoonUseSpineshatterDive = chkDragoonSpineshatterDive.Checked;
        }
        private void chkDragoonUseBuffs_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.DragoonUseBuffs = chkDragoonUseBuffs.Checked;
        }

        private void txtDragoonDragoonDragonfireDive_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.DragoonUseDragonfireDive = chkDragoonDragonfireDive.Checked;
        }
#endregion
        #region BlackMage
        private void txtBlackMagePullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBlackMagePullRange.Text))
            {
                Magitek.WindowSettings.BlackMagePullRange = int.Parse(txtBlackMagePullRange.Text);
            }
        }

        private void chkBlackMageSpreadThunder_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BlackMageSpreadThunder = chkBlackMageSpreadThunder.Checked;
        }

        private void txtBlackMagePhysick_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBlackMagePhysick.Text))
            {
                Magitek.WindowSettings.BlackMagePhysickHp = int.Parse(txtBlackMagePhysick.Text);
            }
        }

        private void txtBlackMageMpToBlizzardIII_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBlackMageMpToBlizzardIII.Text))
            {
                Magitek.WindowSettings.BlackMageBlizzardIIIMana = float.Parse(txtBlackMageMpToBlizzardIII.Text);
            }
        }

        private void txtBlackMageThunderAboveHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBlackMageThunderAboveHp.Text))
            {
                Magitek.WindowSettings.BlackMageUseThunderAboveHp = int.Parse(txtBlackMageThunderAboveHp.Text);
            }
        }

        private void txtBlackMageManaWall_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBlackMageManaWall.Text))
            {
                Magitek.WindowSettings.BlackMageUseManaWallHp = int.Parse(txtBlackMageManaWall.Text);
            }
        }

        private void txtBlackMageManaWard_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtBlackMageManaWard.Text))
            {
                Magitek.WindowSettings.BlackMageUseManawardHp = int.Parse(txtBlackMageManaWard.Text);
            }
        }

        private void chkBlackMageFlareSingleTarget_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BlackMageUseSingleFlare = chkBlackMageFlareSingleTarget.Checked;
        }

        private void chkBlackMageSurecast_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BlackMageUseSurecast = chkBlackMageSurecast.Checked;
        }

        private void chkBlackMagePhysick_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BlackMageUsePhysick = chkBlackMagePhysick.Checked;
        }

        private void chkBlackMageUseAOE_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BlackMageUseAOE = chkBlackMageUseAOE.Checked;
        }

        private void chkBlackMageBlizzardII_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BlackMageUseBlizzard2 = chkBlackMageBlizzardII.Checked;
        }

        private void chkBlackMageRagingStrikes_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BlackMageUseRagingStrikes = chkBlackMageRagingStrikes.Checked;
        }
        private void chkBlackMageQuellingStrikes_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BlackMageUseQuellingStrikes = chkBlackMageQuellingStrikes.Checked;
        }
        private void chkBlackMageVirus_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.BlackMageUseVirus = chkBlackMageUseVirus.Checked;
        }
#endregion
        #region Monk

        private void txtMonkPullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtMonkPullRange.Text))
            {
                Magitek.WindowSettings.MonkPullRange = int.Parse(txtMonkPullRange.Text);
            }
        }
        private void btnMonkSteelPeakAdd_Click(object sender, EventArgs e)
        {
            Magitek.WindowSettings._monksteelpeakinterruptList.Add(txtMonkSteelPeakInterruptAdd.Text);
            txtMonkSteelPeakInterruptAdd.Clear();
        }
        private void chkMonkUseShoulderTackle_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.MonkUseShoulderTackle = chkMonkUseShoulderTackle.Checked;
        }
        private void btnMonkSteelPeakRemove_Click(object sender, EventArgs e)
        {
            if (lstMonkSteelPeakInterrupt.SelectedItems.Count > 0)
            {
                Magitek.WindowSettings._monksteelpeakinterruptList.Remove((string) lstMonkSteelPeakInterrupt.SelectedValue);
            }
        }
        private void btnMonkArmOfTheDestroyerAdd_Click(object sender, EventArgs e)
        {
            Magitek.WindowSettings._monkarmyofthedestroyerinterruptList.Add(txtMonkArmOfTheDestroyerInterruptAdd.Text);
            txtMonkArmOfTheDestroyerInterruptAdd.Clear();
        }
        private void btnMonkArmOfTheDestroyerRemove_Click(object sender, EventArgs e)
        {
            if (lstMonkArmOfTheDestroyerInterrupt.SelectedItems.Count > 0)
            {
                Magitek.WindowSettings._monkarmyofthedestroyerinterruptList.Remove((string) lstMonkArmOfTheDestroyerInterrupt.SelectedValue);
            }
        }
        private void txtMonkInvigorate_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtMonkInvigorate.Text))
            {
                Magitek.WindowSettings.MonkUseInvigorateTp = int.Parse(txtMonkInvigorate.Text);
            }
        }

        private void txtMonkFeatherfoot_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtMonkFeatherfoot.Text))
            {
                Magitek.WindowSettings.MonkUseFeatherfootHp = int.Parse(txtMonkFeatherfoot.Text);
            }
        }

        private void txtMonkFistsOfEarth_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtMonkFistsOfEarth.Text))
            {
                Magitek.WindowSettings.MonkUseFistsOfEarthHp = int.Parse(txtMonkFistsOfEarth.Text);
            }
        }

        private void txtMonkMantra_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtMonkMantra.Text))
            {
                Magitek.WindowSettings.MonkUseMantraHp = int.Parse(txtMonkMantra.Text);
            }
        }

        private void txtMonkSecondWind_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtMonkSecondWind.Text))
            {
                Magitek.WindowSettings.MonkUseSecondWindHp = int.Parse(txtMonkSecondWind.Text);
            }
        }

        private void chkMonkFistsOfWind_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.MonkUseFistsOfWind = chkMonkFistsOfWind.Checked;
        }

        private void chkMonkFracture_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.MonkUseFracture = chkMonkFracture.Checked;
        }

        private void chkMonkHowlingFistSingle_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.MonkUseHowlingFistSingle = chkMonkHowlingFistSingle.Checked;
        }

        private void chkMonkSteelPeakInterrupt_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.MonkUseSteelPeakInterrupt = chkMonkSteelPeakInterrupt.Checked;
        }

        private void chkMonkUseBuffs_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.MonkUseBuffs = chkMonkUseBuffs.Checked;
        }

        private void chkMonkUseAOE_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.MonkUseAOE = chkMonkUseAOE.Checked;
        }
        #endregion
        #region Paladin
        private void txtPaladinRiotBladeMp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(chkPaladinRiotBlade.Text))
            {
                Magitek.WindowSettings.PaladinUseRiotBladeMpPercent = int.Parse(txtPaladinRiotBladeMp.Text);
            }
        }

        private void chkPaladinFlash_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseFlash = chkPaladinFlash.Checked;
        }
        private void chkPaladinCircleSingle_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinCircleSingle = chkPaladinCircleSingle.Checked;
        }
        private void txtPaladinPullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinPullRange.Text))
            {
                Magitek.WindowSettings.PaladinPullRange = int.Parse(txtPaladinPullRange.Text);
            }
        }
        private void chkPaladinUseShieldSwipe_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseShieldSwipe = chkPaladinUseShieldSwipe.Checked;
        }

        private void txtPaladinFlashMpStop_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinFlashMpStop.Text))
            {
                Magitek.WindowSettings.PaladinStopFlashMpPercent = int.Parse(txtPaladinFlashMpStop.Text);
            }
        }

        private void txtPaladinCoverHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinCoverHp.Text))
            {
                Magitek.WindowSettings.PaladinUseCoverHp = int.Parse(txtPaladinCoverHp.Text);
            }
        }

        private void txtPaladinAwarenessHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinAwarenessHp.Text))
            {
                Magitek.WindowSettings.PaladinUseAwarenessHpPercent = int.Parse(txtPaladinAwarenessHp.Text);
            }
        }

        private void txtPaladinBulwarkHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinBulwarkHp.Text))
            {
                Magitek.WindowSettings.PaladinUseBulwarkHpPercent = int.Parse(txtPaladinBulwarkHp.Text);
            }
        }

        private void txtPaladinConvalescenceHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinConvalescenceHp.Text))
            {
                Magitek.WindowSettings.PaladinUseConvalescenceHpPercent = int.Parse(txtPaladinConvalescenceHp.Text);
            }
        }

        private void txtPaladinForesightHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinForesightHp.Text))
            {
                Magitek.WindowSettings.PaladinUseForesightHpPercent = int.Parse(txtPaladinForesightHp.Text);
            }
        }

        private void txtPaladinHallowedGroundHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinHallowedGroundHp.Text))
            {
                Magitek.WindowSettings.PaladinUseHallowedGroundHpPercent = int.Parse(txtPaladinHallowedGroundHp.Text);
            }
        }

        private void txtPaladinRampartHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinRampartHp.Text))
            {
                Magitek.WindowSettings.PaladinUseRampartHpPercent = int.Parse(txtPaladinRampartHp.Text);
            }
        }

        private void txtPaladinSentinelHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinSentinelHp.Text))
            {
                Magitek.WindowSettings.PaladinUseSentinelHpPercent = int.Parse(txtPaladinSentinelHp.Text);
            }
        }

        private void chkPaladinFracture_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseFracture = chkPaladinFracture.Checked;
        }

        private void chkPaladinBashToInterrupt_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseBashToInterrupt = chkPaladinBashToInterrupt.Checked;
        }

        private void chkPaladinSpiritsToInterruptOnly_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseSpiritsWithinOnlyToInterrupt = chkPaladinSpiritsToInterruptOnly.Checked;
        }

        private void chkPaladinUseSpiritsWithin_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseSpiritsWithin = chkPaladinUseSpiritsWithin.Checked;
        }

        private void chkPaladinShieldLob_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseShieldLob = chkPaladinShieldLob.Checked;
        }

        private void chkPaladinRiotBlade_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseRiotBlade = chkPaladinRiotBlade.Checked;
        }

        private void chkPaladinProvoke_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseProvoke = chkPaladinProvoke.Checked;
        }

        private void chkPaladinShieldOath_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseShieldOath = chkPaladinShieldOath.Checked;
        }

        private void chkPaladinTemperedWill_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseTemperedWill = chkPaladinTemperedWill.Checked;
        }

        private void chkPaladinCover_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseCover = chkPaladinCover.Checked;
        }
        private void txtPaladinUseCureHp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinUseCureHp.Text))
            {
                Magitek.WindowSettings.PaladinUseCureHp = int.Parse(txtPaladinUseCureHp.Text);
            }
        }

        private void chkPaladinUseCure_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.PaladinUseCure = chkPaladinUseCure.Checked;
        }
#endregion
        #region Warrior
        private void txtWarriorSecondWind_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorSecondWind.Text))
            {
                Magitek.WindowSettings.WarriorUseSecondWindHp = int.Parse(txtWarriorSecondWind.Text);
            }
        }
        private void chkWarriorSaveBrutalSwing_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorSaveBrutalSwing = chkWarriorSaveBrutalSwing.Checked;
        }
        private void txtWarriorPullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorPullRange.Text))
            {
                Magitek.WindowSettings.WarriorPullRange = int.Parse(txtWarriorPullRange.Text);
            }
        }
        private void chkWarriorToggleMode_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorToggleMode = chkWarriorToggleMode.Checked;
        }
        private void txtWarriorFlashStopMp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorFlashStopMp.Text))
            {
                Magitek.WindowSettings.WarriorFlashStopMp = int.Parse(txtWarriorFlashStopMp.Text);
            }
        }
        private void chkWarriorUseOverpower_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseOverpower = chkWarriorUseOverpower.Checked;
        }
        private void txtWarriorOverpowerStopTp_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorOverpowerStopTp.Text))
            {
                Magitek.WindowSettings.WarriorOverpowerStopTp = int.Parse(txtWarriorOverpowerStopTp.Text);
            }
        }

        private void txtWarriorAwareness_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPaladinAwarenessHp.Text))
            {
                Magitek.WindowSettings.WarriorUseAwarenessHp = int.Parse(txtWarriorAwareness.Text);
            }
        }

        private void txtWarriorConvalescence_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorConvalescence.Text))
            {
                Magitek.WindowSettings.WarriorUseConvalescenceHp = int.Parse(txtWarriorConvalescence.Text);
            }
        }

        private void txtWarriorForesight_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorForesight.Text))
            {
                Magitek.WindowSettings.WarriorUseForesightHp = int.Parse(txtWarriorForesight.Text);
            }
        }

        private void txtWarriorVengeance_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorVengeance.Text))
            {
                Magitek.WindowSettings.WarriorUseVengeanceHp = int.Parse(txtWarriorVengeance.Text);
            }
        }

        private void txtWarriorHolmgang_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorHolmgang.Text))
            {
                Magitek.WindowSettings.WarriorUseHolmGangHp = int.Parse(txtWarriorHolmgang.Text);
            }
        }

        private void txtWarriorThrillOfBattle_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorThrillOfBattle.Text))
            {
                Magitek.WindowSettings.WarriorUseThrillOfBattleHp = int.Parse(txtWarriorThrillOfBattle.Text);
            }
        }

        private void txtWarriorFeatherfoot_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtWarriorFeatherfoot.Text))
            {
                Magitek.WindowSettings.WarriorUseFeatherfootHp = int.Parse(txtWarriorFeatherfoot.Text);
            }
        }

        private void txtWarriorBloodbath_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtDragoonBloodbath.Text))
            {
                Magitek.WindowSettings.WarriorUseBloodbath = int.Parse(txtWarriorBloodbath.Text);
            }
        }

        private void chkWarriorFracture_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseFracture = chkWarriorFracture.Checked;
        }

        private void chkWarriorInfuriate_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseInfuriate = chkWarriorInfuriate.Checked;
        }

        private void chkWarriorInnerBeast_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseInnerBeast = chkWarriorInnerBeast.Checked;
        }

        private void chkWarriorStormsEye_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseStormsEye = chkWarriorStormsEye.Checked;
        }

        private void chkWarriorStormsPath_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseStormsPath = chkWarriorStormsPath.Checked;
        }

        private void chkWarriorTomahawk_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseTomahawk = chkWarriorTomahawk.Checked;
        }

        private void chkWarriorProvoke_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseProvoke = chkWarriorProvoke.Checked;
        }

        private void chkWarriorFlash_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseFlash = chkWarriorFlash.Checked;
        }

        private void chkWarriorDefiance_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseDefiance = chkWarriorDefiance.Checked;
        }

        private void chkWarriorPrioritizeBuffs_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorStormPriority = chkWarriorPrioritizeBuffs.Checked;
        }
#endregion
        #region All Basic Jobs
        private void cmbAllBasicClassesPet_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbAllBasicClassesPet.Text == "Attacker")
            {
                Magitek.WindowSettings.AllBasicClassesUseAttacker = true;
                Magitek.WindowSettings.AllBasicClassesUseTank = false;
            }

            if (cmbAllBasicClassesPet.Text == "Tank")
            {
                Magitek.WindowSettings.AllBasicClassesUseAttacker = false;
                Magitek.WindowSettings.AllBasicClassesUseTank = true;
            }
        }
        private void AllBasicPullRange_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(AllBasicPullRange.Text))
            {
                Magitek.WindowSettings.AllBasicClassespullrange = int.Parse(AllBasicPullRange.Text);
            }
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.AllBasicClassesHealParty = chkAllBasicClassesHealParty.Checked;
        }
        #endregion
        #region PVP Abilities

        private void chkUsePvpAbilities_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.DoPVP = chkUsePvpAbilities.Checked;
        }

        private void chkPVPPurify_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpPurify = chkPVPPurify.Checked;
        }

        private void chkPVPFetterWard_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpFetterWard = chkPVPFetterWard.Checked;
        }

        private void chkPVPAttunement_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpAttunement = chkPVPAttunement.Checked;
        }

        private void chkPVPManaDraw_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpManaDraw = chkPVPManaDraw.Checked;
        }

        private void chkPVPEquanimity_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpEquanimity = chkPVPEquanimity.Checked;
        }

        private void chkPVPFocalization_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpFocalization = chkPVPFocalization.Checked;
        }

        private void chkPVPDivineBreath_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpDivineBreath = chkPVPDivineBreath.Checked;
        }

        private void chkPVPSacredPrism_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpSacredPrism = chkPVPSacredPrism.Checked;
        }

        private void chkPVPTetsudo_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpTetsudo = chkPVPTetsudo.Checked;
        }

        private void chkPVPNightWing_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpNightWing = chkPVPNightWing.Checked;
        }

        private void chkPVPPhantomDart_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpPhantomDart = chkPVPPhantomDart.Checked;
        }

        private void chkPVPThrillOfWar_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpThrillOfWar = chkPVPThrillOfWar.Checked;
        }

        private void chkPVPWeaponThrow_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpWeaponThrow = chkPVPWeaponThrow.Checked;
        }

        private void chkPVPAethericBurst_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpAethericBurst = chkPVPAethericBurst.Checked;
        }

        private void chkPVPAuraBlast_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpAuraBlast = chkPVPAuraBlast.Checked;
        }

        private void chkPVPImpulseRush_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpImpulseRush = chkPVPImpulseRush.Checked;
        }

        private void chkPVPMythrilTempest_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpMythrilTempest = chkPVPMythrilTempest.Checked;
        }

        private void chkPVPMistyVeil_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpMistyVeil = chkPVPMistyVeil.Checked;
        }

        private void chkPVPFarshot_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpFarshot = chkPVPFarshot.Checked;
        }

        private void chkPVPBlastShot_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpBlastShot = chkPVPBlastShot.Checked;
        }

        private void chkPVPManasong_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpManaSong = chkPVPManasong.Checked;
        }

        private void chkPVPAxeKick_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpAxeKick = chkPVPAxeKick.Checked;
        }

        private void chkPVPGlorySlash_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpGlorySlash = chkPVPGlorySlash.Checked;
        }

        private void chkPVPFullSwing_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpFullSwing = chkPVPFullSwing.Checked;
        }

        private void chkPVPSomerSault_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpSomersault = chkPVPSomerSault.Checked;
        }

        private void chkPVPSkewer_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpSkewer = chkPVPSkewer.Checked;
        }

        private void chkPVPEnliven_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpEnliven = chkPVPEnliven.Checked;
        }

        private void chkPVPWither_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.pvpWither = chkPVPWither.Checked;
        }

        private void txtAttunementHpPercent_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtAttunementHpPercent.Text))
            {
                Magitek.WindowSettings.pvpAttunementHpPercent = int.Parse(txtAttunementHpPercent.Text);
            }
        }

        private void txtPVPManaDrawMpPercent_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPVPManaDrawMpPercent.Text))
            {
                Magitek.WindowSettings.pvpManaDrawMpPercent = int.Parse(txtPVPManaDrawMpPercent.Text);
            }
        }

        private void txtPVPEnemiesToAOE_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPVPEnemiesToAOE.Text))
            {
                Magitek.WindowSettings.pvpEnemiesToAOE = int.Parse(txtPVPEnemiesToAOE.Text);
            }
        }

        private void txtPVPTetsudoHpPercent_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtPVPTetsudoHpPercent.Text))
            {
                Magitek.WindowSettings.pvpTetsudoHpPercent = int.Parse(txtPVPTetsudoHpPercent.Text);
            }
        }

        private void btnAddCCBreaks_Click(object sender, EventArgs e)
        {
            Magitek.WindowSettings._pvpCCbreakList.Add(txtCCBreaks.Text);
            txtCCBreaks.Clear();
        }

        private void btnRemoveCCBreaks_Click(object sender, EventArgs e)
        {
            if (lstCCBreaks.SelectedItems.Count > 0)
            {
                Magitek.WindowSettings._pvpCCbreakList.Remove((string) lstCCBreaks.SelectedValue);
            }
        }
    

        #endregion

        private void chkWarriorUseBerserk_CheckedChanged(object sender, EventArgs e)
        {
            Magitek.WindowSettings.WarriorUseBerserk = chkWarriorUseBerserk.Checked;
        }

        private void label95_Click(object sender, EventArgs e)
        {

        }

    }
}
